<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>example methods demo</title>
  </head>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
  <body>
    <h1>Hello example methods demo</h1>
    <hr />
    <div id="app">{{message}}</div>
  </body>

  <script>
    var app = new Vue({
      el: '#app',
      data: {
        message: 'Hello Vue'
      },
      // 在mounted时使用因为这时dom节点全部渲染完成了
      mounted: function () {
        $('#app').html('JQuery 正常使用')
      },
      methods: {
        add: function () {
          console.log('构造器内部ADD方法')
        }
      }


    })

    app.add()
  </script>
</html>
